package org.example.campsys.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.campsys.model.UserInfo;

@Mapper
public interface UserInfoMapper {

    @Select("select id, login_name, password, gender, birthday, phone, email, status " +
            "from t_sys_user where login_name =#{loginName}")
    UserInfo queryUserByName(String loginName);

    @Select("select role_id from t_sys_user_role where user_id = #{id}")
    Integer getRoleId(@Param("id") Integer id);
}
